package com.fg.pro.ai.AiController;

import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.stereotype.Service;

@Service
public class ToolService {

    @Tool(description = "退票")
    public String cancel(
            @ToolParam(description = "预订号码") String tickerNumber,
            @ToolParam(description = "姓名")String name) {
        System.out.println("退票成功");
        System.out.println(tickerNumber);
        System.out.println(name);
        return "退票成功";
    }

    @Tool(description = "退票2")
    public String cancels(
            @ToolParam(description = "预订号码") String tickerNumber,
            @ToolParam(description = "姓名")String name) {
        System.out.println("退票成功");
        System.out.println(tickerNumber);
        System.out.println(name);
        return "退票成功";
    }

}
